package com.cizzy.video.service;

import com.cizzy.video.common.Result;
import com.cizzy.video.entity.dao.VideoDAO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cizzy.video.entity.dto.VideoDTO;
import com.cizzy.video.entity.vo.PageRequest;
import com.cizzy.video.entity.vo.VideoVo;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author crissy-月下闲人
 * @since 2023-10-29
 */
public interface IVideoService extends IService<VideoDAO> {

    Result<List<VideoDAO>> init();

    Result<VideoDAO> createVideo(VideoDAO video);

    Result<List<VideoDAO>> getVideoList(Integer videoNum);

    Result<List<VideoDAO>> getRandVideoList(Integer videoNum);

    Result<List<VideoDAO>> getVideoPage(Integer page, Integer pageSize);

//    Result<List<VideoInfo>> getHomePage(Integer page, Integer pageSize);

    Result<List<VideoDAO>> getVideoPageByType(String type, Integer page, Integer pageSize);

    Result<VideoDAO> getVideoById(Long id);

    Result<VideoDTO> getVideoDTOById(Long id);

//    Result<Video> getVideoByIdBlockhandler(Long id);

    Result<VideoDAO> getVideoByType(String type);

    Result<List<VideoDAO>> getVideoListByType(String type, Integer videoNum);

    Result<VideoDAO> removeVideoById(Long id);

    Result<VideoDAO> updateVideo(VideoDAO video);

    Result<List<VideoDTO>> getVideoListByIds(List<Long> ids);

    Result<List<VideoDTO>> getVideoListByUserId(Long id);

    Result<VideoDTO> getRecommendVideo(Long userId);

    Result<List<VideoDTO>> feed(PageRequest pageRequest);

    Result<VideoDAO> publishVideo(VideoVo videoVo, String userId) throws IOException;

    Result<List<VideoDTO>> searchVideoPage(String keyword, Long videoNum);

    Result<List<Long>> getRandomVideoIdList(Integer num);
}
